<?php

namespace app\module;

use yii\base\BootstrapInterface;
use app\base\classes\Hook;
use app\system\enums\ModuleGroupEnmu;

class Module extends \app\module\BaseModule implements BootstrapInterface {

    public function init() {
        parent::init();
    }

    public function bootstrap($app) {
        Hook::on(\app\system\Module::EVENT_SYSTEM_GROUPNAV, [
            $this,
            "onSetGroupNav"
        ], 100000);
    }

    public function onSetGroupNav($event) {
        $event->parameters->set(ModuleGroupEnmu::MODULE, [
            [
                'url' => [
                    "/$this->id/default/index"
                ],
                'icon' => "fa-delicious",
                'label' => '模块管理'
            ]
        ]);
    }
}